home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
273_01
/
getldate.cc
< prev
next >
Wrap
Text File
|
1988-04-17
|
1KB
|
31 lines
#include <dos.h>
#include <stdio.h>
#include <stdlib.h>
long int get_long_date()
/*
┌────────────────────────────────────────────────────────────────────┐
│Purpose: Get the current date. │
│ │
│ Inputs: None. │
│ │
│Outputs: None. │
│ │
│ Return: A long int containing the current date in the format │
│ YYMMDD. │
└────────────────────────────────────────────────────────────────────┘
*/
{
struct date today;
char mystr[40];
long l_date;
getdate(&today);
sprintf(mystr,"%2.2d%2.2d%2.2d",
today.da_year - 1900,today.da_mon,today.da_day);
l_date = atol(mystr);
return(l_date);
}